home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_200 / 250_01 / fsqr.s < prev    next >
Text File  |  1987-10-27  |  512b  |  31 lines

  1.     .ttl    "fsqr.s"
  2.  
  3. * MC68020/MC68881 IEEE Format Single Precision Routines
  4. *
  5. * Written by: Edmund H. Ramm
  6. *
  7. * _fsqr entry point for single prec. square, operand in 4(sp)
  8. *
  9. *     sp     4
  10. *    ---------------
  11. *    | ret  |  x   |
  12.  
  13.  
  14.     .text
  15.     .globl    _fsqr
  16.  
  17.  
  18. _fsqr:
  19. *
  20. * on exit, d0 = fsqr( 4(sp) )
  21. *
  22. *    fmove.s    4(sp),fp0        * fp0 <-- operand
  23.     dc.w    $f22f,$4400,$0004
  24. *    fmul.x    fp0,fp0            * square operand
  25.     dc.w    $f200,$0023
  26. *    fmove.s    fp0,d0            * d0 <-- square
  27.     dc.w    $f200,$6400
  28.     rts
  29.  
  30.     .end
  31.